<?php
if (!defined('IN_CRONLITE')) exit();
$User = login_data::user_data();
?>
<!DOCTYPE html>
<html lang="en">

<head>
	<title><?php echo $conf['sitename'] ?> - <?php echo $conf['title'] ?></title>
	<meta name="keywords" content="<?php echo $conf['keywords'] ?>" />
	<meta name="description" content="<?php echo $conf['description'] ?>" />
	<meta charset="utf-8" />

	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui" />

	<link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/template/FaKa/assets/bootstrap.min.css" />
	<link href="<?php echo $cdnpublic; ?>font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/template/FaKa/assets/style.css?v=2" />
	<link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/template/FaKa/assets/pcoded-horizontal.min.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/template/FaKa/assets/gmpanel.css" />
	<link href="<?php echo $cdnserver; ?>assets/layui/css/layui.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/template/FaKa/assets/mobile.css" />
</head>

<body id="app" class="query">
	<div class="theme-loader">
		<div class="loader-track">
			<div class="loader-bar"></div>
		</div>
	</div>
	<div id="pcoded" class="pcoded">
		<div class="pcoded-container">
			<nav class="navbar header-navbar pcoded-header">
				<div class="navbar-wrapper">
					<div class="navbar-logo" logo-theme="theme1">
						<a href="/"><img class="img-fluid" src="<?= $conf['logo'] ?>" alt="<?php echo $conf['sitename'] ?>" style="max-height: 35px;" /></a>
						<a class="mobile-options">
							更多
							<i class="fa fa-ellipsis-v"></i>
						</a>
					</div>

					<div class="navbar-container container-fluid">
						<ul class="nav-right">
							<li></li>
							<li>
								<a href="./">
									<i class="fa fa-opera"></i>
									首页
								</a>
							</li>
							<li>
								<a href="#" @click="AlertKefu">
									<i class="fa fa-commenting"></i>
									联系客服
								</a>
							</li>
							<li>
								<a v-if="Service.url != -1" :href="Service.url" target="_blank">
									<i class="fa fa-commenting"></i>
									在线咨询
								</a>
							</li>
							<li>
								<a v-if="InformData.Appurl != ''" :href="InformData.Appurl" target="_blank">
									<i class="fa fa-android"></i>

									下载APP
								</a>
							</li>
							<li>
								<a href="./?mod=query">
									<i class="fa fa-search"></i>
									查询订单
								</a>
							</li>
							<?php if ($User != false) { ?>
								<li><a href="/user/index.php">我的后台</a></li>
							<?php } else { ?>
								<li>
									<a href="/user/login.php" style="color:red">
										<img src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/image/nav_money.png" alt="开通分站" />
										开通分站
									</a>
								</li>

								<li><a href="/user/login.php">后台登录</a></li>
							<?php } ?>
						</ul>
					</div>
				</div>
			</nav>
			<div class="pcoded-main-container">
				<div class="container">
					<div class="main-body">
						<div class="page-wrapper">
							<div class="page-body">
								<div class="signin-card card-block auth-body mr-auto ml-auto">
									<div class="card mt-4">
										<div class="card-block">
											<div class="input-group input-group-sm input-group-button">
												<input type="text" class="query_info form-control" placeholder="请输入购买时填写的第一行下单信息" v-model="seek" />
												<span @click="GetOrderList(-2)" class="input-group-addon" style="display: block; width: 70px; text-align: center; height: 35px; line-height: 35px;">
													查有绑
												</span>
												<span @click="GetOrderList(-3)" class="input-group-addon" style="display: block; width: 70px; text-align: center; height: 35px; line-height: 35px;">
													查游客
												</span>
											</div>
										</div>
									</div>
								</div>
							</div>

							<div class="page-body">
								<div class="signin-card card-block auth-body mr-auto ml-auto">
									<div class="card">
										<div class="card-block">
											<div class="bl_more">
												<div class="text-left">
													<ul class="pagination">
														<li>
															<span class="rows">共 {{ OrderData.length }} 条订单</span>
														</li>
														<li <?= ($User == false ? '' : 'style="display: none;"') ?>>
															<a style="color: red;" href="/user">检测到您未登陆，登陆后可绑定订单，他人无法查询，保护您的购买信息，点我登陆！</a>
														</li>
													</ul>
												</div>
												<hr />
											</div>
											<div style="box-shadow: 3px 3px 16px #eee;padding: 0.5em;margin-bottom: 1em;border-radius: 0.5em;" v-for="(item, index) in OrderData">
												<span v-if="item.state==1" class="layui-badge" style="background-color: #00E676">已完成</span>
												<span v-else-if="item.state==2" class="layui-badge" style="background-color: #40C4FF">待处理</span>

												<span v-else-if="item.state==3" class="layui-badge" style="background-color: #FF5252">异常中</span>

												<span v-else-if="item.state==4" class="layui-badge" style="background-color: #FFD54F">处理中</span>

												<span v-else-if="item.state==5" class="layui-badge" style="background-color: #A6A6A6">已退款</span>

												<span v-else-if="item.state==6" class="layui-badge" style="background-color: #ff4254">售后中</span>

												<span v-else-if="item.state==7" class="layui-badge" style="background-color: #18b50c">已评价</span>

												<span v-else class="layui-badge" style="background-color: #A6A6A6">未知</span>

												订单号: {{ item.order }}
												<hr />
												<h4 style="color: forestgreen;">下单信息：</h4>
												<span v-for="(items, ins) in item.input">
													{{ (item.value[ins]==unll?'输入框'+(ins+1):item.value[ins]) }} ：{{ items }}
													<br />
												</span>
												<hr />
												<h4 v-if="item.Token.length>=1" style="color: salmon;">卡密信息：</h4>
												<span v-for="(items, ins) in item.Token">
													卡{{ (ins+1) +'：' + items.token }}
													<br />
												</span>
												<hr v-if="item.Token.length>=1" />
												<h4 v-if="item.RemarkType==2" style="color: darkcyan;">物流单号：</h4>
												{{ item.remark }}
												<hr v-if="item.RemarkType==2" />
												<h4>
													商品：
													<a :href="'/?mod=shop&gid=' + item.gid">{{ item.name }}</a>
												</h4>
												<br />
												<span v-if="item.coupon!=-1">
													付款金额：
													<font color="red" size="3">{{ item.price }}元<span class="layui-word-aux" style="font-size:0.8em;text-decoration:line-through;">{{
                                                    item.originalprice }}元</span></font>
												</span>
												<span v-else>
													付款金额：
													<font color="blue">{{ item.price + (item.payment != '积分兑换' ? '元' : item.currency) }}</font>
												</span>
												<br />
												付款方式：
												<font color="blue">{{ item.payment }}</font>
												<br />
												付款时间：
												<font color="blue">{{ item.addtime }}</font>

												<a target="_blank" :href="Tracking + item.remark" v-if="item.RemarkType==2" class="btn layui-btn layui-btn-sm layui-btn-radius" style="float: right;margin-top: -5em;background-color: darkorange;">物流</a>

												<button @click="GetQuery(item.id)" class="btn layui-btn layui-btn-sm layui-btn-radius" style="float: right;margin-top: -2em;background-color: #9575CD;">详情</button>

											</div>
										</div>
									</div>
								</div>
							</div>
							<div><?= $conf['statistics'] ?></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<script src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/js/jquery.min.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/js/bootstrap.min.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/js/jquery.slimscroll.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/js/pcoded.min.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/js/menu-hori-fixed.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/js/jquery.mcustomscrollbar.concat.min.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/js/script.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/layui/layui.all.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/js/vue3.js"></script>
	<script src="<?php echo $cdnserver; ?>assets/template/FaKa/assets/js/query.js?vs=<?= $accredit['versions'] ?>"></script>
</body>

</html>